package com.smartcommunity.service.statistic;

import com.smartcommunity.dao.statistic.AccessStatisticDao;
import com.smartcommunity.entity.statistic.AccessStatisticEntity;
import com.smartcommunity.entity.statistic.AccessStatisticDataResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author nieming
 * @descrition
 * @date 2020/6/8
 */
@Service
public class AccessStatisticService {

    @Autowired
    private AccessStatisticDao accessStatisticDao;

    public void insertBatch(List<AccessStatisticEntity> accessStatisticEntity) {
        accessStatisticDao.insertBatch(accessStatisticEntity);
    }

    public void updateBatch(List<AccessStatisticEntity> accessStatisticEntity) {
        accessStatisticDao.updateBatch(accessStatisticEntity);
    }

    public boolean exits(AccessStatisticEntity accessStatisticEntity) {
        return accessStatisticDao.exits(accessStatisticEntity) > 0;
    }
    public Long queryFaceCount(AccessStatisticDataResp accessStatisticDataResp) {
        return accessStatisticDao.queryFaceCount(accessStatisticDataResp);
    }
}
